package com.anyou.mall.supply.service.impl;

import java.util.List;
import com.anyou.common.utils.DateUtils;
import com.anyou.mall.supply.domain.Supply;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.anyou.mall.supply.mapper.SupplyTimeMapper;
import com.anyou.mall.supply.domain.SupplyTime;
import com.anyou.mall.supply.service.ISupplyTimeService;

/**
 * 补给配送时间Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-10-13
 */
@Service
public class SupplyTimeServiceImpl extends ServiceImpl<SupplyTimeMapper, SupplyTime> implements ISupplyTimeService
{
    @Autowired
    private SupplyTimeMapper supplyTimeMapper;

    /**
     * 查询补给配送时间
     * 
     * @param supplyTimeId 补给配送时间主键
     * @return 补给配送时间
     */
    @Override
    public SupplyTime selectSupplyTimeBySupplyTimeId(Long supplyTimeId)
    {
        return supplyTimeMapper.selectSupplyTimeBySupplyTimeId(supplyTimeId);
    }

    /**
     * 查询补给配送时间列表
     * 
     * @param supplyTime 补给配送时间
     * @return 补给配送时间
     */
    @Override
    public List<SupplyTime> selectSupplyTimeList(SupplyTime supplyTime)
    {
        return supplyTimeMapper.selectSupplyTimeList(supplyTime);
    }

    /**
     * 新增补给配送时间
     * 
     * @param supplyTime 补给配送时间
     * @return 结果
     */
    @Override
    public int insertSupplyTime(SupplyTime supplyTime)
    {
        supplyTime.setCreateTime(DateUtils.getNowDate());
        return supplyTimeMapper.insertSupplyTime(supplyTime);
    }

    /**
     * 修改补给配送时间
     * 
     * @param supplyTime 补给配送时间
     * @return 结果
     */
    @Override
    public int updateSupplyTime(SupplyTime supplyTime)
    {
        supplyTime.setUpdateTime(DateUtils.getNowDate());
        return supplyTimeMapper.updateSupplyTime(supplyTime);
    }

    /**
     * 批量删除补给配送时间
     * 
     * @param supplyTimeIds 需要删除的补给配送时间主键
     * @return 结果
     */
    @Override
    public int deleteSupplyTimeBySupplyTimeIds(Long[] supplyTimeIds)
    {
        return supplyTimeMapper.deleteSupplyTimeBySupplyTimeIds(supplyTimeIds);
    }

    /**
     * 删除补给配送时间信息
     * 
     * @param supplyTimeId 补给配送时间主键
     * @return 结果
     */
    @Override
    public int deleteSupplyTimeBySupplyTimeId(Long supplyTimeId)
    {
        return supplyTimeMapper.deleteSupplyTimeBySupplyTimeId(supplyTimeId);
    }
}
